#coding:utf-8
from rest_framework import serializers
from erp_system.models import DeptModel

class DeptSerializer(serializers.ModelSerializer):
    #用户所在的部门序列化
    #把日期类型的属性，格式化字符串
    create_time=serializers.DateTimeField(format='%Y-%m-%d %H:%M:%S',read_only=True)
    class Meta:
        model=DeptModel
        fields='__all__'